// 排序 依次比较 
function candy(cArr, pArr) {
    let cArr = cArr.sort((a, b) => a - b)
    let pArr = pArr.sort((a, b) => a - b)
    let count = 0;
    let pindex = 0
    for (let i = 0; i < cArr.length; i++) {
        if (i < pArr.length && cArr[i] >= pArr[pindex]) {
            count += 1;
            pindex += 1;
        }
    }
    return count
}